<?php

class GTpropertyViewModel extends ViewModel{
	
	public $table='gproperty';
	
	 public $view=array(
	  	'gproperty' =>
	  	 array(
	    '_type' => 'INNER',
	  	 ),
	  	'tproperty' =>
	  	 array(
	  	  '_type' => 'INNER',
	  	  '_on' => 'gproperty.tpid=tproperty.tpid',
   	),
   );
   
   public function get_all_data($where=null,$group=null){
   		
		if($group){
			return $this->where($where)->group($group)->all();
		}else{
			
			return $this->where($where)->all();
		}
   }
   
   
   
}
